
*For Margaret dropbox folders 
global NCREIF "/Users/BeckaBrolinson/Dropbox/NCREIF/data" 
global build 	"$NCREIF/build" 
global analysis "$NCREIF/analysis"
global results 	"$analysis/results"
global figures 	"$analysis/figures" 


*------------------------------------------------------------------------------*
*	Step 2- Unmatched Pooled Regressions	   *
*------------------------------------------------------------------------------*
{
	use "$build/01_annualizeddatawcontrol.dta", replace
	*Set up log file to take output to Prof Vella 
	*log using "$NCREIF\Logs\OutputForVella", replace 
	
	gen sqft1000s = sqft / 1000 
	gen HDD1000s = HDD / 1000 
	gen CDD1000s = CDD / 1000 
	gen used_space1000s = used_space/ 1000
	gen real_capex_ti_sqft = real_capex_ti / sqft 
	gen real_capex_bldimp_sqft = real_capex_bldimp / sqft 
	
	*List of covariates 
	*Control variables (So that I can test and compare covariate balance with different controls 
	#d ;
	global Cov1 	"Covered_E real_elecprice real_gasprice Unemployment HDD1000s CDD1000s 
	age2 age used_space1000s
	 percentleased real_capex_ti_sqft real_capex_bldimp_sqft "; 
	global Cov2 	"Covered_E real_elecprice real_gasprice Unemployment HDD1000s CDD1000s 
	 age age2 percentleased used_space1000s
	dFundType1 dFundType2 dFundType4 dFundType5 dFundType6";
	global Cov3	"Covered_E real_elecprice Unemployment HDD1000s CDD1000s
	age2 age used_space1000s"; 
	#d cr 
	
	*Pooled Regression of utility per square foot on treat*post 
	*log real util per sf 
	regress logrealutilpersf interaction 
	*With Controls 
	regress logrealutilpersf interaction $Cov3 
	*IHS real util per sf 
	regress IHSlogrealutilpersf interaction 
	
	
	*Pooled Regression of Rent Per Square foot on Treat* Post 
	regress logrealrentpersf interaction 
	*With Controls 
	regress logrealrentpersf interaction $Cov1 
	
	*Percentage Leased Regressions 
	regress percentleased interaction 
	*With controls 
	regress percentleased interaction Covered_E real_elecprice real_gasprice Unemployment HDD1000s CDD1000s age2 age
	*With FE 
	reghdfe percentleased interaction Covered_E real_elecprice real_gasprice Unemployment HDD1000s CDD1000s age2 age, absorb(i.propnum i.city_cat#i.year) vce(cluster cbsa) 
}
